package com.sysmind.ravi.margin.dao.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import com.sysmind.ravi.margin.dao.CashDao;
import com.sysmind.ravi.margin.model.Cash;
import com.sysmind.ravi.margin.model.User;
import com.sysmind.ravi.margin.utils.JDBCHelper;

public class CashDaoImpl implements CashDao
{	JDBCHelper jhelp;
	Connection conn = null;
	PreparedStatement pstmt = null;
	Statement stmt = null;
	ResultSet rs = null;
	
	@Override
	public Cash getCashInfo(User user) 
	{	jhelp = new JDBCHelper();
		conn = jhelp.getConnection();
		try
		{	String sql = "select * from cash where user.User_id = "+user.getUserId();
			stmt = conn.createStatement();
			rs = stmt.executeQuery(sql);
		}
		catch(SQLException sqlex)
		{
			sqlex.printStackTrace();
		}
		
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean setCashInfo(User user, double cashAmt) 
	{
		// TODO Auto-generated method stub
		return false;
	}

}
